<%@ page import="com.minxi.jsp.javabean.UserInfo" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024-06-18
  Time: 17:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String contextPath = request.getContextPath();
    UserInfo userInfo = (UserInfo) request.getSession().getAttribute("userInfo");
%>

<form action="<%=contextPath%>/update" method="get">

    <input type="hidden" name="id" value="<%=userInfo.getId()%>"><br>

    <input type="text" name="user_name" placeholder="请输入用户名" value="<%=userInfo.getUser_name()%>"><br>
    <input type="text" name="user_phone" placeholder="请输入手机号码" value="<%=userInfo.getUser_phone()%>"><br>

    <%if ("男" == userInfo.getUser_gender()){%>
    <input type="radio" name="userSex" value="1" checked>男
    <input type="radio" name="userSex" value="2">女<br>
    <%}else if("女" == userInfo.getUser_gender()){%>
    <input type="radio" name="userSex" value="1">男
    <input type="radio" name="userSex" value="2" checked>女<br>
    <%}%>
    <input type="submit" value="保存">
</form>
</body>
</html>
